package edu.mju.B9_3.bean;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @Author: wyp
 * @Date: 2020/10/12 21:35
 */
public class BeanPostProcessorImpl implements BeanPostProcessor {

    //在执行JuciMaker2顺序4之前执行
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("["+bean.getClass().getSimpleName()+"]对象："+beanName+"，postProcessBeforeInitialization()方法");
        return bean;
    }

    //在执行JuciMaker2顺序5之前执行
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("["+bean.getClass().getSimpleName()+"]对象："+beanName+",postProcessAfterInitialization()方法");
        return bean;
    }
}
